import {RequestHandler as Middleware, Response, Request} from 'express';

type Method =
    | 'get'
    | 'post'
    | 'head'
    | 'put'
    | 'delete'
    | 'connect'
    | 'patch'
    | 'options'
    | 'trace';

export type Handler = (req: Request, res: Response) => any;

export type Route = {
    method: Method;
    path: string;
    middleware: Middleware[];
    handler: Handler;
}
